Update critical nodes endpoint curl examples#23368
Conversation
✅ Deploy Preview for cockroachdb-interactivetutorials-docs canceled.
|
✅ Deploy Preview for cockroachdb-api-docs canceled.
|
|
✅ Cross-Version Link Check Passed All cross-version link issues have been resolved. Good job! |
|
@stevendanna not really a very technical update but would appreciate your user POV re: is this easier to scan/find by a busy engineer during an escalation PS they're all the same update so it's fine to just review e.g. the v26.2 one (or whichever) |
✅ Netlify Preview
To edit notification comments on pull requests, go to your Netlify project configuration. |
| #### Request the endpoint | ||
|
|
||
| To return the JSON response, send a `POST` request to `/_status/critical_nodes`. | ||
|
|
||
| For an insecure or local testing cluster, use HTTP: | ||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| curl -X POST http://<host>:<http-port>/_status/critical_nodes | ||
| ~~~ | ||
|
|
||
| For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`. | ||
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key | ||
| curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/_status/critical_nodes | ||
| ~~~ | ||
|
|
There was a problem hiding this comment.
Thanks for adding this! I wonder if this might be better more centralized somewhere since presumably these instructions work for all of the HTTP/HTTPS endpoints on this page?
There was a problem hiding this comment.
thanks for the review!
ya that's a good point, i think i will move it to a new section called "authenticate to API endpoints" or something similar
Move curl authentication examples from the critical nodes endpoint section into a new "Authenticate to API endpoints" section that applies to all HTTP endpoints on the page. The critical nodes section now references the shared section via anchor link. Addresses review feedback from stevendanna on #23368.
7de77e3 to
2eb4633
Compare
taroface
left a comment
There was a problem hiding this comment.
LGTM! Just one syntax/style comment for the whole PR.
|
|
||
| {% include_cached copy-clipboard.html %} | ||
| ~~~ shell | ||
| curl http://<host>:<http-port>/<endpoint> |
There was a problem hiding this comment.
Style note: We're using { } rater than < > unless this explicitly confuses the syntax.
Fixes DOC-17121
Summary of changes: